<div class="ad" id="commercial3">
   <?php
    $com_id = 12;//hp-allcats-lblb
    
    if (Zend_Registry::isRegistered('main_category')){
        $category = Zend_Registry::get('main_category');
        $module = $this->getRequest()->getModuleName();
        if ($module == 'category') {
            switch($category->id) {
                case 'mc69': //adult
                    $com_id = 17;
                    break;
                case 'mc52': //business directory
                    $com_id = 20;
                    break;            
                case 'mc55'://car
                    $com_id = 49;
                    break;            
                case 'mc51'://clothes
                    $com_id = 21;
                    break;            
                case 'mc77'://maids
                    $com_id = 23;
                    break;            
                case 'mc73'://electronics
                    $com_id = 24;
                    break;            
                case 'mc71'://F and B
                    $com_id = 25;
                    break;            
                case 'mc74'://Health
                    $com_id = 26;
                    break;            
                case 'mc50'://home and garden
                    $com_id = 27;
                    break;            
                case 'mc59'://Jobs
                    $com_id = 51;
                    break;            
                case 'mc56'://Pets
                    $com_id = 30;
                    break;            
                case 'mc49'://Property
                    $com_id = 31;
                    break;            
                case 'mc75'://sports
                    $com_id = 32;
                    break;            
                case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                    $com_id = 540;
                    break;
                case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                    $com_id = 522;
                    break;
                case '9ed52f88e33a7409862efc61470038c2'://free
                    $com_id = 563;
                    break;                    
                default:
                    $com_id = 358;
            }
        } elseif ($module == 'listing') {            
            switch($category->id) {
                case 'mc69': //adult
                    $com_id = 294;
                    break;
                case 'mc52': //business directory
                    $com_id = 297;
                    break;            
                case 'mc55'://car
                    $com_id = 298;
                    break;            
                case 'mc51'://clothes
                    $com_id = 299;
                    break;            
                case 'mc77'://maids
                    $com_id = 301;
                    break;            
                case 'mc73'://electronics
                    $com_id = 302;
                    break;            
                case 'mc71'://F and B
                    $com_id = 303;
                    break;            
                case 'mc74'://Health
                    $com_id = 304;
                    break;            
                case 'mc50'://home and garden
                    $com_id = 305;
                    break;            
                case 'mc59'://Jobs
                    $com_id = 306;
                    break;            
                case 'mc56'://Pets
                    $com_id = 309;
                    break;            
                case 'mc49'://Property
                    $com_id = 310;
                    break;            
                case 'mc75'://sports
                    $com_id = 311;
                    break;            
                case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                    $com_id = 504;
                    break;
                case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                    $com_id = 545;
                    break;
                case '9ed52f88e33a7409862efc61470038c2'://free
                    $com_id = 568;
                    break;
                default:
                    $com_id = 366;
            }            
        } elseif ($module == 'search') {
            switch($category->id) {
                case 'mc69': //adult
                    $com_id = 194;
                    break;
                case 'mc52': //business directory
                    $com_id = 197;
                    break;            
                case 'mc55'://car
                    $com_id = 198;
                    break;            
                case 'mc51'://clothes
                    $com_id = 199;
                    break;            
                case 'mc77'://maids
                    $com_id = 201;
                    break;            
                case 'mc73'://electronics
                    $com_id = 202;
                    break;           
                case 'mc71'://F and B
                    $com_id = 203;
                    break;            
                case 'mc74'://Health
                    $com_id = 204;
                    break;            
                case 'mc50'://home and garden
                    $com_id = 205;
                    break;            
                case 'mc59'://Jobs
                    $com_id = 206;
                    break;            
                case 'mc56'://Pets
                    $com_id = 209;
                    break;            
                case 'mc49'://Property
                    $com_id = 210;
                    break;            
                case 'mc75'://sports
                    $com_id = 211;
                    break;            
                case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                    $com_id = 517;
                    break;
                case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                    $com_id = 535;
                    break;
                case '9ed52f88e33a7409862efc61470038c2'://free
                    $com_id = 558;
                    break;
                default:
                    $com_id = 360;
            }
        }
    }
    ?>
    <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>' 
            frameborder='0' scrolling='no' width='728' height='90'>
    </iframe> 
</div>
